<html>
<head>
<title>发布通知</title>
<!-- Meta tags -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/font-awesome.min.css" />
<!--stylesheets-->
<link href="css/style.css" rel='stylesheet' type='text/css'>
<link href="css/wickedpicker.css" rel="stylesheet" type='text/css'/>
<script type="text/javascript" src="scripts/jquery/jquery-1.7.1.js"></script>
<style type="text/css">
/*单选按钮*/
.gcs-radio {
	display: none;
}

.gcs-radio+label {
	background-color:white;
	width: 20px;
	height: 20px;
	line-height: 18px;
	display: inline-block;
	text-align: center;
	vertical-align: bottom;
	border: 1px solid gray;
	border-radius: 50%;
	margin-bottom: 0;
}

.gcs-radio+label:hover {
	border: 1px solid #2783FB;
	cursor: pointer;
}

.gcs-radio:checked+label {
	background: #2783FB;
	border: 1px solid #2783FB;
}

.gcs-radio:checked+label:after {
	content: "\2022";
	font-size: 40px;
	color: white;
}
</style>
</head>
<body><h1 class="header-w3ls"></h1>
	<div class="appointment-w3">
		<form id="add_message">
			<div class="form-control-w3l">
				<input type="text" id="orgn" name="title" placeholder="通 知 标 题">
			</div>
			<div style="color:white;font-size: 20px;margin-bottom: 15px;">
				<input type="radio" name="msgLevel" class="gcs-radio" id="gao" value="0"/><label for="gao"></label>&nbsp;&nbsp;高级信息
				&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="msgLevel" checked="checked" class="gcs-radio" id="di" value="1"/><label for="di"></label>&nbsp;&nbsp;低级信息
			</div>
			<div class="form-control-w3l">
				<textarea id="message" name="content"
					placeholder="发布通知类容...."></textarea>
			</div>
			<input type="button" id="submit" value="确   定   发   布">
		</form>
	</div>
</body>

<script type="text/javascript">
	$("#submit").click(function(){
		if($("#orgn").val()==null||$("#orgn").val()==""){
			alert("标题不能为空！");
		}else if($("#message").val()==null||$("#message").val()==""){
			alert("请填写通知类容！");
		}else{
			$.ajax({
				type:"post",//请求类型
				url:"/EDUSystem/message/addMessage.do",//请求路径
				dataType:"json",//响应的数据类型
				data:$("#add_message").serialize(),
				success:function suc(dt){//响应成功后的回调函数
					if(dt.code==1){
						alert("发布成功！")
					}else{
						alert(dt.message)
					}
				},
				errer:function err(){
					alert("服务器出现故障")
				}
			});
		}
		
	});
</script>
</html>